package com.xujiang.common_core.util.tool;

import android.os.Handler;
import android.os.Looper;

/**
 * @author xujiang
 * @version 2017-07-19 17:15
 */
public class HandlerUtils {
    public static final Handler HANDLER = new Handler(Looper.getMainLooper());

    public static void runOnUiThread(Runnable runnable){
        HANDLER.post(runnable);
    }

    public static void runOnUiThreadDelay(Runnable runnable, long delayMillis){
        HANDLER.postDelayed(runnable,delayMillis);
    }


    public static void removeRunable(Runnable runnable){
        HANDLER.removeCallbacks(runnable);
    }


}
